import { createStore } from 'vuex'

export default createStore({
  state: {
    userModel: null,
    wordCount: 0,
    wordLimit: 5,   //单词背诵的数量
  },
  mutations: {
    setUserModel: (state, value) => {
      state.userModel = value;
    },
    setWordCount: (state,value)=> {
      state.wordCount = value;
    }
  },
  actions: {
  },
  modules: {
  },
  getters: {
    getUserModel: (state) =>{
      return state.userModel;
    },
    getWordCount: (state) =>{
      return state.wordCount;
    }
  }
})
